home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
extras
/
programm
/
mcode_01
/
source
/
basics
/
gettext.s
< prev
next >
Wrap
Text File
|
1995-04-27
|
918b
|
25 lines
* Program : Read a strin g from the keyboard
* Author : Stephen McNabb
* Creation date : 15th February 1995
* Last update : 15th February 1995
* Parameters : Length of string to be read
* Output : Length of string read followed by actual string
start: move.l #length,-(sp) /move length of string to be read onto stack
move.w #$A,-(sp) /use Cconrs() function
trap #1 /use gemdos
end: addq.l #6,sp /tidy up stack
*** Program Data ***
length: dc.b 20 /length of string to be read -+
read: dc.b 0 /length of string actually read | keep together
string: ds.b 21 /string read -+
* Note : Keep these three statements together and always make sure
* that the length of 'string' is one more than the number of
* length of the string you want to read. This is to ensure
* that there the string has a null character at the end of it
* and can be displayed.
*** End of file ***